import Vue from 'vue'
import App from './App'
import {
	open,
	close,
	toast,
	showToast,
	showLoading,
	showModal,
	chooseImgs,
	previewImg
} from './utils/uni-tools'
import {
	toDate,
	getDifference,
	durationToTime,
	add0,
	getType,
	isEmpty,
	disLog,
	getSystem,
	hideMobile,
	realnameTest,
	mobileTest,
	idTest,
	emailTest,
	numberTest,
	strLength
} from './utils/utils'
import storage from './storage/storage'
import store from './store'

Vue.prototype.$open = open
Vue.prototype.$close = close
Vue.prototype.$toast = toast
Vue.prototype.$showToast = showToast
Vue.prototype.$showLoading = showLoading
Vue.prototype.$showModal = showModal
Vue.prototype.$chooseImgs = chooseImgs
Vue.prototype.$previewImg = previewImg

Vue.prototype.$toDate = toDate
Vue.prototype.$getDifference = getDifference
Vue.prototype.$durationToTime = durationToTime
Vue.prototype.$add0 = add0
Vue.prototype.$getType = getType
Vue.prototype.$isEmpty = isEmpty
Vue.prototype.$disLog = disLog
Vue.prototype.$getSystem = getSystem
Vue.prototype.$hideMobile = hideMobile
Vue.prototype.$realnameTest = realnameTest
Vue.prototype.$mobileTest = mobileTest
Vue.prototype.$idTest = idTest
Vue.prototype.$emailTest = emailTest
Vue.prototype.$numberTest = numberTest
Vue.prototype.$strLength = strLength

Vue.prototype.$storage = storage
Vue.prototype.$store = store

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	...App,
	store
})
app.$mount()
